﻿<link href="~/Scripts/jquery-easyui-extensions/tabs/jeasyui.extensions.tabs.css" rel="stylesheet" />
<script src="~/Scripts/jquery-easyui-extensions/tabs/jeasyui.extensions.tabs.dndTab.js"></script>

<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north',border:false,title:'北部'" style="height:100px;border-bottom-width:1px;padding:25px;">
        <a id="btnEnableDndTab" class="easyui-linkbutton" data-options="iconCls:'icon-add'">开启标签页拖拽</a>
        <a id="btnDisableDndTab" class="easyui-linkbutton" data-options="iconCls:'icon-add'">关闭标签页拖拽</a>
    </div>
    <div data-options="region:'center',border:false,title:'中间'">
        <div id="tabs1" class="easyui-tabs" data-options="fit:true,border:false">
            <div data-options="title:'标签页1',closable:false,selected:true,iconCls:'icon-add'" style="padding:15px;">
                标签页1
            </div>
            <div data-options="title:'标签页2',closable:true,iconCls:'icon-edit'" style="padding:15px;">
                标签页2
            </div>
            <div data-options="title:'标签页3',closable:true,iconCls:'icon-edit'" style="padding:15px;">
                标签页3
            </div>
            <div data-options="title:'标签页4',closable:true,iconCls:'icon-edit'" style="padding:15px;">
                标签页4
            </div>
            <div data-options="title:'标签页5',closable:true,iconCls:'icon-edit'" style="padding:15px;">
                标签页5
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $("#btnEnableDndTab").click(function () {
            $("#tabs1").tabs("enableDnd");
            alert("已经开启拖拽");
        });

        $("#btnDisableDndTab").click(function () {
            $("#tabs1").tabs("disableDnd");
            alert("已经关闭拖拽");
        });

    });
</script>